﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PortfolioApp.DataModels
{
    public class Post
    {
        public int Id { get; set; }
        public string ApplicationUserId { get; set; }
        //public virtual ApplicationUser ApplicationUser { get; set; }
        public string Title { get; set; }
        public string Comment { get; set; }
        public long TimeStamp { get; set; }

        public Post()
        {
            TimeStamp = DateTime.Now.ToBinary();
        }
        public Post(string userId, string title, string comment)
        {
            ApplicationUserId = userId;
            Title = title;
            Comment = comment;
            TimeStamp = DateTime.Now.ToBinary();
        }
        public void SetProperties(Post post)
        {
            Title = post.Title;
            Comment = post.Comment;
        }
    }
}
